package net.wexoo.onlinedivelog.entity.diveLevel;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @author wexoo
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(of = "id")

@Entity
@Table(name = "DIVE_LEVEL")
public class DiveLevelBean implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "generator")
	@SequenceGenerator(name = "generator", sequenceName = "DIVE_LEVEL_SEQUENCE")
	@Column(name = "ID")
	private Integer id;
	
	@Column(name= "NAME")
	private String name;

	public DiveLevelBean(String name) {
		this.name = name;
	}
}